Exploratory Plots for 2017-2018 Acoustic/Fish Data
Purpose To explore the Acoustic data gathered in 2017 and 2018 to expose important trends between sites, diurnal patterns, fish abundance, lunar phase, and coral reef acoustics.
Combined Model All variables are matched to the files that were used for Fish call counts (3:00, 9:00, 15:00, 21:00)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Running basic regressions linking the explanatory to the response at their lowest levels and combined to see how different sites/ hours change the regression - SPL
Linear Model outputs below each
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF17)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.8309 -1.9842 0.2062 1.8451 13.3944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.053e+02 6.541e-01 160.99 <2e-16 ***
## Snaps 7.227e-03 4.475e-04 16.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.807 on 10163 degrees of freedom
## Multiple R-squared: 0.02502, Adjusted R-squared: 0.02493
## F-statistic: 260.8 on 1 and 10163 DF, p-value: < 2.2e-16
2017 Snap data, snaps significant.
When you break it down by site, site 32 has the opposite relationship with high frequency and snaps.
2017 Snap/HF SPL Site Breakdown
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.0817 -2.1540 0.4371 1.9805 7.0937
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 87.830664 1.873329 46.88 <2e-16 ***
## Snaps 0.018381 0.001277 14.39 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.483 on 2101 degrees of freedom
## Multiple R-squared: 0.08971, Adjusted R-squared: 0.08928
## F-statistic: 207.1 on 1 and 2101 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.3374 -1.3945 0.1363 1.4230 9.4265
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.185e+01 1.270e+00 56.59 <2e-16 ***
## Snaps 3.314e-02 9.084e-04 36.48 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.117 on 1831 degrees of freedom
## Multiple R-squared: 0.4209, Adjusted R-squared: 0.4206
## F-statistic: 1331 on 1 and 1831 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.9213 -1.7565 -0.0424 1.6512 10.3407
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 71.282701 1.451690 49.10 <2e-16 ***
## Snaps 0.029598 0.000995 29.75 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.573 on 2205 degrees of freedom
## Multiple R-squared: 0.2864, Adjusted R-squared: 0.2861
## F-statistic: 884.9 on 1 and 2205 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.1902 -1.2312 0.0344 1.2186 9.3897
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.644e+01 1.044e+00 73.19 <2e-16 ***
## Snaps 2.679e-02 7.062e-04 37.93 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.736 on 1862 degrees of freedom
## Multiple R-squared: 0.4359, Adjusted R-squared: 0.4356
## F-statistic: 1439 on 1 and 1862 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s17s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.936 -1.084 0.114 1.063 7.102
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 137.43721 0.89844 152.97 <2e-16 ***
## Snaps -0.01414 0.00060 -23.56 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.532 on 2156 degrees of freedom
## Multiple R-squared: 0.2047, Adjusted R-squared: 0.2044
## F-statistic: 555 on 1 and 2156 DF, p-value: < 2.2e-16
2018 Snap/HF SPL
Removing outliers
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF18)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.4682 -1.9696 0.0058 2.4042 30.2074
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.617e+01 8.999e-01 95.75 <2e-16 ***
## Snaps 2.269e-02 6.168e-04 36.78 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.142 on 5823 degrees of freedom
## Multiple R-squared: 0.1886, Adjusted R-squared: 0.1884
## F-statistic: 1353 on 1 and 5823 DF, p-value: < 2.2e-16
2018 Snap data with outliers removed. Snaps significant.
When split by sight, site 32 has a flat relationship.
2018 Snap/HF SPL Site Breakdown
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.0981 -1.7519 0.0868 1.8483 7.3155
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 65.228548 2.209305 29.52 <2e-16 ***
## Snaps 0.034773 0.001507 23.07 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.358 on 1163 degrees of freedom
## Multiple R-squared: 0.3141, Adjusted R-squared: 0.3135
## F-statistic: 532.5 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.8360 -1.2952 0.0422 1.3418 5.6060
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.663e+01 1.432e+00 46.52 <2e-16 ***
## Snaps 3.654e-02 9.848e-04 37.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.872 on 1163 degrees of freedom
## Multiple R-squared: 0.5421, Adjusted R-squared: 0.5417
## F-statistic: 1377 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.907 -1.162 0.056 1.130 7.400
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.354e+01 1.029e+00 81.18 <2e-16 ***
## Snaps 2.627e-02 6.956e-04 37.77 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.721 on 1160 degrees of freedom
## Multiple R-squared: 0.5515, Adjusted R-squared: 0.5511
## F-statistic: 1426 on 1 and 1160 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.0382 -1.5465 -0.0117 1.4352 9.5694
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 71.758279 1.518229 47.26 <2e-16 ***
## Snaps 0.031320 0.001047 29.91 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.057 on 1163 degrees of freedom
## Multiple R-squared: 0.4348, Adjusted R-squared: 0.4343
## F-statistic: 894.8 on 1 and 1163 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = s18s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.018 -1.897 0.075 1.698 5.913
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.203e+02 1.488e+00 80.885 <2e-16 ***
## Snaps 3.421e-04 1.028e-03 0.333 0.739
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.055 on 1163 degrees of freedom
## Multiple R-squared: 9.519e-05, Adjusted R-squared: -0.0007646
## F-statistic: 0.1107 on 1 and 1163 DF, p-value: 0.7394
Mid Frequency
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = AC.DF1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.267 -0.871 1.597 19.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.047e+02 3.888e-01 269.163 < 2e-16 ***
## Tot_Knocks 1.744e-02 4.465e-03 3.906 0.000129 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.519 on 198 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06685
## F-statistic: 15.26 on 1 and 198 DF, p-value: 0.0001287
2017-2018 data w/200 samples. 1st plot splits by site and second by hour to show any patterns before I break them down individually.
Breakdown by Site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.4846 -2.3049 0.1011 1.9482 6.0310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.065e+02 1.106e+00 96.290 <2e-16 ***
## Tot_Knocks 5.551e-04 8.256e-03 0.067 0.947
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.034 on 38 degrees of freedom
## Multiple R-squared: 0.0001189, Adjusted R-squared: -0.02619
## F-statistic: 0.00452 on 1 and 38 DF, p-value: 0.9467
Site 5, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.1201 -3.6626 0.4059 4.2686 9.1758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.01636 1.19662 87.761 <2e-16 ***
## Tot_Knocks 0.03231 0.01218 2.653 0.0116 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.804 on 38 degrees of freedom
## Multiple R-squared: 0.1563, Adjusted R-squared: 0.1341
## F-statistic: 7.039 on 1 and 38 DF, p-value: 0.01157
Site 35, knocks significant.
Removing 2 outliers > 150
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35E)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.6933 -3.4563 0.5509 3.7326 5.9745
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 103.65392 1.45143 71.415 <2e-16 ***
## Tot_Knocks 0.06400 0.02366 2.705 0.0108 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.032 on 32 degrees of freedom
## Multiple R-squared: 0.1861, Adjusted R-squared: 0.1607
## F-statistic: 7.319 on 1 and 32 DF, p-value: 0.01085
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.5526 -1.5016 0.6098 1.8588 6.6098
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.497101 0.700474 150.61 <2e-16 ***
## Tot_Knocks -0.006653 0.009929 -0.67 0.507
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.727 on 38 degrees of freedom
## Multiple R-squared: 0.01168, Adjusted R-squared: -0.01433
## F-statistic: 0.449 on 1 and 38 DF, p-value: 0.5068
Site 8, knocks not significant. Negative relationship… thats interesting.
Removing Outlier
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8E)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3549 -1.7770 -0.0747 1.6182 6.3206
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 106.89195 0.84585 126.372 <2e-16 ***
## Tot_Knocks -0.03653 0.01478 -2.473 0.0181 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.542 on 37 degrees of freedom
## Multiple R-squared: 0.1418, Adjusted R-squared: 0.1186
## F-statistic: 6.113 on 1 and 37 DF, p-value: 0.01814
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s40)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2090 -0.9792 -0.3831 0.7009 4.7409
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.041e+02 4.407e-01 236.176 <2e-16 ***
## Tot_Knocks 6.514e-03 8.094e-03 0.805 0.426
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.554 on 38 degrees of freedom
## Multiple R-squared: 0.01676, Adjusted R-squared: -0.009116
## F-statistic: 0.6477 on 1 and 38 DF, p-value: 0.4259
Site 40, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s32)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0442 -1.9728 -0.7078 0.0613 18.4340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 103.79253 0.92602 112.084 <2e-16 ***
## Tot_Knocks 0.04784 0.01903 2.514 0.0163 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.783 on 38 degrees of freedom
## Multiple R-squared: 0.1426, Adjusted R-squared: 0.12
## F-statistic: 6.321 on 1 and 38 DF, p-value: 0.01629
Site 32, knocks significant.
Breakdown by Hour
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h3)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8821 -2.3813 -0.5447 2.0264 6.8553
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.043e+02 7.055e-01 147.893 <2e-16 ***
## Tot_Knocks 5.296e-03 7.304e-03 0.725 0.472
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.121 on 48 degrees of freedom
## Multiple R-squared: 0.01083, Adjusted R-squared: -0.009773
## F-statistic: 0.5258 on 1 and 48 DF, p-value: 0.4719
3AM, knocks not significant.
Splitting by site to see if any site has a relationship
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h9)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3144 -1.6662 -0.4952 0.7818 8.0555
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 102.90908 0.61924 166.186 < 2e-16 ***
## Tot_Knocks 0.05274 0.00653 8.076 1.69e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.703 on 48 degrees of freedom
## Multiple R-squared: 0.5761, Adjusted R-squared: 0.5672
## F-statistic: 65.22 on 1 and 48 DF, p-value: 1.69e-10
9AM, knocks significant
Splitting by site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h15)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0816 -2.0625 -0.9435 1.2227 7.1127
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.697228 0.669185 157.949 <2e-16 ***
## Tot_Knocks -0.006816 0.011700 -0.583 0.563
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.128 on 48 degrees of freedom
## Multiple R-squared: 0.007021, Adjusted R-squared: -0.01367
## F-statistic: 0.3394 on 1 and 48 DF, p-value: 0.5629
3PM, knocks not significant
Splitting by site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = h21)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.987 -2.505 -0.915 1.457 18.595
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.060e+02 9.217e-01 114.979 <2e-16 ***
## Tot_Knocks 4.355e-03 9.860e-03 0.442 0.661
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.91 on 48 degrees of freedom
## Multiple R-squared: 0.004048, Adjusted R-squared: -0.0167
## F-statistic: 0.1951 on 1 and 48 DF, p-value: 0.6607
9PM, knocks not significant.
Splitting by site.
3 AM, long calls don’t seem to explain a great deal of the relationship at any site
9 AM, long calls don’t seem to explain the relationship at any site
3 PM, long calls don’t seem to explain the relationship
9 PM, long calls don’t seem to explain the relationship
3 AM, Extremely low herbivory at all sites. No relationship
Again, extremely low herbivory, no relationship.
Higher herbivory. Seems like there is a relationship at site 40, 8, and 35.
Higher herbivory here as well, although there is no positive relationship at any site.
Summary Knocks significantly explained SPLMF at sites 35 and 32 and at 9AM.
Running basic regressions linking the wind to SPL at both HF and MF to see if wind speed is significantly affecting the sound
## Warning: Removed 1518 rows containing non-finite values (stat_smooth).
## Warning: Removed 1518 rows containing missing values (geom_point).
## Warning: Removed 1520 rows containing non-finite values (stat_smooth).
## Warning: Removed 1520 rows containing missing values (geom_point).
Wind doesn’t seem to impact SPL HF or MF in any particular direction. Although the wind range seems really small.
Running basic regressions linking the explanatory to the response at their lowest levels and combined to see how different sites/ hours change the regression - SPL
Linear Model outputs below each
##
## Call:
## lm(formula = SPL_HF ~ Snaps, data = Snap.HF17C)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.8309 -1.9842 0.2062 1.8451 13.3944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.055e+01 6.541e-01 -16.14 <2e-16 ***
## Snaps 7.227e-03 4.475e-04 16.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.807 on 10163 degrees of freedom
## Multiple R-squared: 0.02502, Adjusted R-squared: 0.02493
## F-statistic: 260.8 on 1 and 10163 DF, p-value: < 2.2e-16
2017 Snap data, snaps significant.
Mid Frequency
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = AC.DF1C)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.248 -2.267 -0.871 1.597 19.211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.058e+02 2.488e-01 425.326 < 2e-16 ***
## Tot_Knocks 1.744e-02 4.465e-03 3.906 0.000129 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.519 on 198 degrees of freedom
## Multiple R-squared: 0.07154, Adjusted R-squared: 0.06685
## F-statistic: 15.26 on 1 and 198 DF, p-value: 0.0001287
2017-2018 data w/200 samples. 1st plot splits by site and second by hour to show any patterns before I break them down individually.
#subsetting only lm variables
AC.DF1Co <- subset(AC.DF1C, select = c(SPL_Midrange, Tot_Knocks, Num_L_calls, Num_Herbivory, Site, Hour))
vif(AC.DF1Co)
## Variables VIF
## 1 SPL_Midrange 1.233794
## 2 Tot_Knocks 1.602587
## 3 Num_L_calls 1.274945
## 4 Num_Herbivory 1.363614
## 5 Site 1.161708
## 6 Hour 1.134078
#no colinnearity found between explanatory variables
#ggpairs(AC.DF1Co)
All values are near 1, values of 4 or 5 would be moderate. 1 = no collinearity. I think this means that we have no collinearity between my explanatory variables
Breakdown by Site
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s5c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.4846 -2.3049 0.1011 1.9482 6.0310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.066e+02 6.538e-01 162.961 <2e-16 ***
## Tot_Knocks 5.551e-04 8.256e-03 0.067 0.947
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.034 on 38 degrees of freedom
## Multiple R-squared: 0.0001189, Adjusted R-squared: -0.02619
## F-statistic: 0.00452 on 1 and 38 DF, p-value: 0.9467
Site 5, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s35c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.1201 -3.6626 0.4059 4.2686 9.1758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 107.17848 0.76752 139.643 <2e-16 ***
## Tot_Knocks 0.03231 0.01218 2.653 0.0116 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.804 on 38 degrees of freedom
## Multiple R-squared: 0.1563, Adjusted R-squared: 0.1341
## F-statistic: 7.039 on 1 and 38 DF, p-value: 0.01157
Site 35, knocks significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s8c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.5526 -1.5016 0.6098 1.8588 6.6098
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.051860 0.445578 235.76 <2e-16 ***
## Tot_Knocks -0.006653 0.009929 -0.67 0.507
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.727 on 38 degrees of freedom
## Multiple R-squared: 0.01168, Adjusted R-squared: -0.01433
## F-statistic: 0.449 on 1 and 38 DF, p-value: 0.5068
Site 8, knocks not significant. Negative relationship… thats interesting.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s40c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2090 -0.9792 -0.3831 0.7009 4.7409
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.045e+02 3.021e-01 345.957 <2e-16 ***
## Tot_Knocks 6.514e-03 8.094e-03 0.805 0.426
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.554 on 38 degrees of freedom
## Multiple R-squared: 0.01676, Adjusted R-squared: -0.009116
## F-statistic: 0.6477 on 1 and 38 DF, p-value: 0.4259
Site 40, knocks not significant.
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks, data = s32c)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0442 -1.9728 -0.7078 0.0613 18.4340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 106.99389 0.82383 129.874 <2e-16 ***
## Tot_Knocks 0.04784 0.01903 2.514 0.0163 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.783 on 38 degrees of freedom
## Multiple R-squared: 0.1426, Adjusted R-squared: 0.12
## F-statistic: 6.321 on 1 and 38 DF, p-value: 0.01629
Site 32, knocks significant.
Acoustics Breakdown All acoustic metrics (SPL and ACI) are broken down into 2 frequency bands: High Frequency (Frequencies between 1 kHz - 22 kHz) and Mid Frequency (Frequencies between 160 Hz and 1 kHz)
Note 2017 had a 10 minute duty cycle with 5 minutes recording while 2018 had a 15 minute duty cycle with 5 minutes recording, so the number of files averages differs between years
Total Deployment Plots
Preliminary Models Looking into the relationships between biogenic sounds (Knocks/Calls and Snaps) and their frequency spectra (MF SPL/HF SPL) respectively.
shapiro.test(AC.DF1$SPL_Midrange)
##
## Shapiro-Wilk normality test
##
## data: AC.DF1$SPL_Midrange
## W = 0.89502, p-value = 1.225e-10
qqnorm(AC.DF1$SPL_Midrange)
ks.test(SPLHF.long$SPL_HF, "pnorm", mean=mean(SPLHF.long$SPL_HF), sd=sd(SPLHF.long$SPL_HF))
## Warning in ks.test(SPLHF.long$SPL_HF, "pnorm", mean =
## mean(SPLHF.long$SPL_HF), : ties should not be present for the Kolmogorov-
## Smirnov test
##
## One-sample Kolmogorov-Smirnov test
##
## data: SPLHF.long$SPL_HF
## D = 0.027859, p-value = 5.618e-12
## alternative hypothesis: two-sided
ks.test(SPLMF.long$SPL_MF, "pnorm", mean=mean(SPLMF.long$SPL_MF), sd=sd(SPLMF.long$SPL_MF))
##
## One-sample Kolmogorov-Smirnov test
##
## data: SPLMF.long$SPL_MF
## D = 0.089921, p-value < 2.2e-16
## alternative hypothesis: two-sided
gamma_test(AC.DF1$SPL_Midrange)
##
## Test of fit for the Gamma distribution
##
## data: AC.DF1$SPL_Midrange
## V = 9.8936, p-value = 2.637e-12
weibull_test(AC.DF1$SPL_Midrange)
##
## Test for the Weibull distribution
##
## data: AC.DF1$SPL_Midrange
## p-value < 2.2e-16
gamma_test(AC.DF1$SPL_HF)
##
## Test of fit for the Gamma distribution
##
## data: AC.DF1$SPL_HF
## V = 0.16773, p-value = 0.9056
weibull_test(AC.DF1$SPL_HF)
##
## Test for the Weibull distribution
##
## data: AC.DF1$SPL_HF
## p-value < 2.2e-16
Don’t seem to have a normal distribution here… Working on testing different distributions. Not sure what the outputs on the gamma or weibull tests mean
Using only the two interactions that are significant, Tot_Knocks:Hour and Num_Herbiory:Hour, removing Long calls because it isn’t significant and adding site and year as fixed effects
Using years combined
#subsetting only lm variables
AC.DF1Co <- subset(AC.DF1C, select = c(SPL_Midrange, Tot_Knocks, Num_L_calls, Num_Herbivory, Site, Hour, Year))
#making Hour ordinal
AC.DF1Co$Hour_factor <- factor (AC.DF1$Hour, order = TRUE, levels = c("3", "9", "15", "21"))
fit1 <- lm(SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor + Site + Year , data = AC.DF1Co)
summary(fit1)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor +
## Site + Year, data = AC.DF1Co)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3122 -1.6333 -0.1849 1.3944 17.0470
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 104.059396 0.527849 197.139 < 2e-16 ***
## Site35 0.703106 0.618540 1.137 0.25712
## Site40 -1.339345 0.594096 -2.254 0.02534 *
## Site5 -0.119728 0.692071 -0.173 0.86284
## Site8 -0.896726 0.604805 -1.483 0.13985
## Year18 3.596665 0.371747 9.675 < 2e-16 ***
## Tot_Knocks:Hour_factor3 0.005186 0.006419 0.808 0.42023
## Tot_Knocks:Hour_factor9 0.042591 0.006759 6.302 2.08e-09 ***
## Tot_Knocks:Hour_factor15 -0.006117 0.009421 -0.649 0.51694
## Tot_Knocks:Hour_factor21 0.003490 0.007411 0.471 0.63823
## Hour_factor3:Num_Herbivory 0.242666 0.149985 1.618 0.10737
## Hour_factor9:Num_Herbivory -0.313843 0.151347 -2.074 0.03949 *
## Hour_factor15:Num_Herbivory 0.065801 0.025188 2.612 0.00972 **
## Hour_factor21:Num_Herbivory -0.047379 0.079104 -0.599 0.54993
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.617 on 186 degrees of freedom
## Multiple R-squared: 0.5175, Adjusted R-squared: 0.4838
## F-statistic: 15.35 on 13 and 186 DF, p-value: < 2.2e-16
#options(na.action = "na.fail")
#dredge(gfit6)
Interaction between Site and Tot_Knocks with Hour as fixed effect
fit1i <- lm(SPL_Midrange ~ Tot_Knocks:Site + Num_Herbivory + Hour_factor + Year, data = AC.DF1Co)
summary(fit1i)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks:Site + Num_Herbivory +
## Hour_factor + Year, data = AC.DF1Co)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.5233 -1.6508 -0.4413 1.5002 16.9121
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 104.198610 0.313291 332.593 < 2e-16 ***
## Num_Herbivory 0.060428 0.026927 2.244 0.025981 *
## Hour_factor.L 0.688227 0.428754 1.605 0.110124
## Hour_factor.Q -0.556836 0.424106 -1.313 0.190787
## Hour_factor.C 1.219376 0.445446 2.737 0.006783 **
## Year18 3.663882 0.408758 8.963 3.04e-16 ***
## Tot_Knocks:Site32 0.017571 0.011321 1.552 0.122331
## Tot_Knocks:Site35 0.026953 0.007403 3.641 0.000351 ***
## Tot_Knocks:Site40 0.039283 0.012841 3.059 0.002541 **
## Tot_Knocks:Site5 0.003311 0.006106 0.542 0.588304
## Tot_Knocks:Site8 0.006780 0.010460 0.648 0.517642
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.856 on 189 degrees of freedom
## Multiple R-squared: 0.4161, Adjusted R-squared: 0.3852
## F-statistic: 13.47 on 10 and 189 DF, p-value: < 2.2e-16
Splitting by year and then using site as a fixed effect
2017
#2017
AC.DF17 <- AC.DF1Co[which(AC.DF1Co$Year == 17),]
#2018
AC.DF18 <- AC.DF1Co[which(AC.DF1Co$Year == 18),]
fit17 <- lm(SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor + Site, data = AC.DF17)
summary(fit17)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor +
## Site, data = AC.DF17)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.0735 -0.9708 -0.2031 0.5977 6.0536
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 103.927133 0.429512 241.966 < 2e-16 ***
## Site35 -1.240316 0.520509 -2.383 0.019355 *
## Site40 0.773366 0.510556 1.515 0.133460
## Site5 0.054893 0.646146 0.085 0.932493
## Site8 -0.832115 0.534057 -1.558 0.122840
## Tot_Knocks:Hour_factor3 0.001684 0.006584 0.256 0.798674
## Tot_Knocks:Hour_factor9 0.028834 0.007722 3.734 0.000336 ***
## Tot_Knocks:Hour_factor15 -0.002616 0.008206 -0.319 0.750687
## Tot_Knocks:Hour_factor21 -0.001089 0.006056 -0.180 0.857786
## Hour_factor3:Num_Herbivory 0.340468 0.128479 2.650 0.009561 **
## Hour_factor9:Num_Herbivory -0.449545 0.127855 -3.516 0.000698 ***
## Hour_factor15:Num_Herbivory 0.099727 0.021018 4.745 8.12e-06 ***
## Hour_factor21:Num_Herbivory 0.012992 0.064635 0.201 0.841158
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.565 on 87 degrees of freedom
## Multiple R-squared: 0.5238, Adjusted R-squared: 0.4581
## F-statistic: 7.975 on 12 and 87 DF, p-value: 7.631e-10
2018
fit18 <- lm(SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor + Site, data = AC.DF1Co)
summary(fit18)
##
## Call:
## lm(formula = SPL_Midrange ~ Tot_Knocks:Hour_factor + Num_Herbivory:Hour_factor +
## Site, data = AC.DF1Co)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.0054 -2.1220 -0.5208 1.7465 18.8057
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 105.942767 0.599955 176.585 < 2e-16 ***
## Site35 0.590618 0.756213 0.781 0.4358
## Site40 -1.358831 0.726452 -1.871 0.0630 .
## Site5 -0.303921 0.845939 -0.359 0.7198
## Site8 -0.905564 0.739550 -1.224 0.2223
## Tot_Knocks:Hour_factor3 0.005718 0.007849 0.728 0.4672
## Tot_Knocks:Hour_factor9 0.047789 0.008238 5.801 2.77e-08 ***
## Tot_Knocks:Hour_factor15 -0.002397 0.011510 -0.208 0.8353
## Tot_Knocks:Hour_factor21 0.004377 0.009061 0.483 0.6296
## Hour_factor3:Num_Herbivory 0.235640 0.183399 1.285 0.2004
## Hour_factor9:Num_Herbivory -0.303946 0.185062 -1.642 0.1022
## Hour_factor15:Num_Herbivory 0.060789 0.030793 1.974 0.0498 *
## Hour_factor21:Num_Herbivory -0.036763 0.096718 -0.380 0.7043
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.2 on 187 degrees of freedom
## Multiple R-squared: 0.2747, Adjusted R-squared: 0.2282
## F-statistic: 5.903 on 12 and 187 DF, p-value: 1.141e-08
Looking at Snaps and their effect on the HF SPL
Using Site and Year as fixed effects here
fit2t <- lm(SPL_HF ~ Snaps + Site + Year, data = AC.DF1)
summary(fit2t)
##
## Call:
## lm(formula = SPL_HF ~ Snaps + Site + Year, data = AC.DF1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.8362 -1.9020 0.1782 1.8719 6.1705
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 80.173407 4.493791 17.841 < 2e-16 ***
## Snaps 0.024438 0.003011 8.117 5.49e-14 ***
## Site35 0.131586 0.584192 0.225 0.82203
## Site40 -1.489068 0.581391 -2.561 0.01119 *
## Site5 -2.459775 0.580167 -4.240 3.47e-05 ***
## Site8 1.926522 0.603377 3.193 0.00164 **
## Year18 3.957446 0.367115 10.780 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.593 on 193 degrees of freedom
## Multiple R-squared: 0.5281, Adjusted R-squared: 0.5134
## F-statistic: 36 on 6 and 193 DF, p-value: < 2.2e-16
par(mfrow = c(2,2))
plot(fit2t)
summary(fit2t)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 80.17340678 4.49379121 17.8409283 1.069916e-42
## Snaps 0.02443775 0.00301055 8.1173706 5.493199e-14
## Site35 0.13158573 0.58419178 0.2252441 8.220277e-01
## Site40 -1.48906825 0.58139108 -2.5612162 1.119456e-02
## Site5 -2.45977489 0.58016711 -4.2397696 3.466851e-05
## Site8 1.92652232 0.60337671 3.1929014 1.644816e-03
## Year18 3.95744586 0.36711468 10.7798629 1.640277e-21
Using interaction between Site and Snaps here and Year is fixed
fit2i <- lm(SPL_HF ~ Snaps:Site + Year, data = AC.DF1)
summary(fit2i)
##
## Call:
## lm(formula = SPL_HF ~ Snaps:Site + Year, data = AC.DF1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.867 -1.858 0.208 1.893 6.165
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 79.899699 4.415367 18.096 < 2e-16 ***
## Year18 3.939999 0.367792 10.713 < 2e-16 ***
## Snaps:Site32 0.024586 0.002980 8.251 2.41e-14 ***
## Snaps:Site35 0.024740 0.003028 8.169 3.99e-14 ***
## Snaps:Site40 0.023632 0.003006 7.862 2.60e-13 ***
## Snaps:Site5 0.022972 0.002996 7.667 8.39e-13 ***
## Snaps:Site8 0.025984 0.003093 8.402 9.46e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.598 on 193 degrees of freedom
## Multiple R-squared: 0.5263, Adjusted R-squared: 0.5115
## F-statistic: 35.73 on 6 and 193 DF, p-value: < 2.2e-16
par(mfrow = c(2,2))
plot(fit2i)
summary(fit2i)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 79.89969940 4.415366774 18.095824 1.918246e-43
## Year18 3.93999898 0.367792008 10.712574 2.588519e-21
## Snaps:Site32 0.02458557 0.002979615 8.251255 2.407012e-14
## Snaps:Site35 0.02474002 0.003028434 8.169245 3.993005e-14
## Snaps:Site40 0.02363161 0.003005779 7.862059 2.603401e-13
## Snaps:Site5 0.02297162 0.002996061 7.667275 8.394491e-13
## Snaps:Site8 0.02598444 0.003092820 8.401534 9.464968e-15
Putting in spectrograms to analyze how the 4 different times sampled look
Note All spectrograms are time along the x axis, frequency along the y axis, frequency is zoomed in to just 0 - 3 kHz
Times progression: 3 AM, 9 AM, 3 PM, 9 PM
Site 5
Site 8
Site 35
Site 32